package entity;

public class Email {

  private String masterNumber;

  private String emailAddress;

  public Email(String masterNumber, String emailAddress) {
    this.masterNumber = masterNumber;
    this.emailAddress = emailAddress;
  }

  public void setMasterNumber(String masterNumber) {
    this.masterNumber = masterNumber;
  }

  public String getMasterNumber(){
    return masterNumber;
  }

  public String getEmailAddress(){
    return emailAddress;
  }

  @Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    Email other = (Email) obj;
    if (masterNumber == null) {
      if (other.masterNumber != null)
        return false;
    } else if (!masterNumber.equals(other.masterNumber))
      return false;
    if (emailAddress == null) {
      if (other.emailAddress != null)
        return false;
    } else if (!emailAddress.equals(other.emailAddress))
      return false;
    return true;
  }
}
